[Top] [Prev] [Next] [Bottom]
[Contents]
SaIsSubmitName
Tests for the value of a Form Submit Element which has a name, "SubmitName".
#include "SaRnHtml.h"
int SaIsSubmitName(char* name);
Arguments
- name
- Specifies the value of the Form Submit Input Element to test.
Return Values
Returns 1 if a Form Submit Element with name, SubmitName
, has a value of the Argument Name.
Test for the value of a Form Submit Element which has a name, SubmitName
. The test returns "1" if a Form Submit Element with SubmitName
has a value of the Argument name. Note that in the example below, the form submit elements all have the name SubmitName
. This function would not be useful unless the Form Submit Element and Argument name matched. If you test by this method, you will have to use SaGetInputValue
and do string compares.
Given the following HTML fragments from a form:
<INPUT TYPE="submit" NAME="SubmitName" VALUE="Insert">
<INPUT TYPE="submit" NAME="SubmitName" VALUE="Update">
<INPUT TYPE="submit" NAME="SubmitName" VALUE="Delete">
The following code will determine which submit button was pressed.
if(SaIsSubmitName("Insert"))
{
/*** do insert ***/
}
if(SaIsSubmitName("Update"))
{
/*** do update***/
}
if(SaIsSubmitName("Delete"))
{
/*** do delete***/
}
See Also
[Top] [Prev] [Next] [Bottom]
[Contents]
info@bluestone.com
Copyright © 1997, Bluestone. All rights
reserved.